home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 2003 August / MW 8 2003 CD1.iso / Inside Macworld / Product News / gimp-1.2.4.sit / gimp-1.2.4 / plug-ins / script-fu / script-fu-intl.h < prev    next >
Encoding:
C/C++ Source or Header  |  2003-02-13  |  1.9 KB  |  58 lines

  1. /* The GIMP -- an image manipulation program
  2.  * Copyright (C) 1995 Spencer Kimball and Peter Mattis
  3.  *
  4.  * script-fu-intl.h
  5.  *
  6.  * This library is free software; you can redistribute it and/or
  7.  * modify it under the terms of the GNU Lesser General Public
  8.  * License as published by the Free Software Foundation; either
  9.  * version 2 of the License, or (at your option) any later version.
  10.  * 
  11.  * This library is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14.  * Lesser General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU Lesser General Public
  17.  * License along with this library; if not, write to the
  18.  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  19.  * Boston, MA 02111-1307, USA.
  20.  */
  21. #ifndef __SCRIPT_FU_INTL_H__
  22. #define __SCRIPT_FU_INTL_H__
  23.  
  24. #include "libgimp/gimpintl.h"
  25.  
  26. #if defined (HAVE_BIND_TEXTDOMAIN_CODESET) && defined (GDK_WINDOWING_WIN32)
  27. #define BTDCS(d) bind_textdomain_codeset (d, "UTF-8")
  28. #else
  29. #define BTDCS(d)
  30. #endif
  31.  
  32. #ifdef HAVE_LC_MESSAGES
  33. #define INIT_I18N()    G_STMT_START{            \
  34.   setlocale(LC_MESSAGES, "");                 \
  35.   bindtextdomain("gimp-libgimp", LOCALEDIR);            \
  36.   BTDCS("gimp-libgimp");                \
  37.   bindtextdomain("gimp-script-fu", LOCALEDIR);            \
  38.   BTDCS("gimp-script-fu");                \
  39.   textdomain("gimp-script-fu");                    \
  40.               }G_STMT_END
  41. #else
  42. #define INIT_I18N()    G_STMT_START{            \
  43.   bindtextdomain("gimp-libgimp", LOCALEDIR);            \
  44.   BTDCS("gimp-libgimp");                \
  45.   bindtextdomain("gimp-script-fu", LOCALEDIR);            \
  46.   BTDCS("gimp-script-fu");                \
  47.   textdomain("gimp-script-fu");                         \
  48.               }G_STMT_END
  49. #endif
  50.  
  51. #define INIT_I18N_UI()    G_STMT_START{    \
  52.   gtk_set_locale();            \
  53.   setlocale (LC_NUMERIC, "C");        \
  54.   INIT_I18N();                \
  55.             }G_STMT_END
  56.  
  57. #endif /* __SCRIPT_FU_INTL_H__ */
  58.